/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package jogodavelha;

/**
 *
 * @author isa
 */
public class Tabuleiro {
    private int[][] tab = new int[3][3];
    public Tabuleiro(){
    }
    public void Inicializa(){
        for(int i=0; i<3; i++){
            for(int j=0; j<3; j++)
                tab[i][j]=0;
                }
    }
    public void Desenha(){
        for(int i=0; i<3; i++){
            for(int j=0; j<3; j++){
                if(tab[i][j] == 2){
                    System.out.print(" X ");
                }
                if(tab[i][j] == -1)
                    System.out.print(" O ");
                
                if(tab[i][j] == 0)
                    System.out.print("   ");
                
                if(j == 0 || j == 1)
                    System.out.print("|");
        }
         System.out.println();
        }
    }
 /*   public int[][] getTabuleiro() {
        return tab;
    }*/
    public int getPosicao(int x, int y){
        return tab[x][y];
    }
    public void setTabuleiro(int x, int y, int var) {
        tab[x][y] = var;
    }
}
    

